<template>
    <div>
        <van-search v-model="value" placeholder="请输入搜索关键词" />
        <van-grid icon-size="60px">
  <van-grid-item icon="https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg" text="阿珂" />
  <van-grid-item icon="https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg" text="地方" />
  <van-grid-item icon="https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg" text="数量" />
  <van-grid-item icon="https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg" text="下面" />
</van-grid>
   <van-card
   v-for="item in data"
    :key="item.id"
    :desc="item.name"
    :title="item.title"
    :thumb="item.url"
    @click="jk(item)"
  />
    </div>
</template>

<script setup>
import { ref } from "vue";
import axios from 'axios';
 import { useRouter } from 'vue-router';
 let router=new useRouter
 const data=ref([])
const hh=async()=>{
   const jieko=await axios.get('/api/room/list')
     data.value=jieko.data.data.list
}
const jk=(v)=>{
    router.push({
        path:"/home/"+v.id,   
        query:v
    })
}
hh()
</script>

<style lang="scss" scoped>

</style>